#ifndef JRUNNABLE_H
#define JRUNNABLE_H

#include <JXQCore/JXQGlobal>
#include <atomic>

namespace JXQ
{

class JThreadPool;

class JXQLIB_EXPORT JRunnable
{
protected:
	JRunnable();

public:
	virtual ~JRunnable() = 0;

protected:
	virtual void run() = 0;

private:
	std::atomic_uint counter;
	J_DISABLE_COPY(JRunnable)
	friend class JThreadPool;
};

} //namespace JXQ


#endif // JRUNNABLE_H
